package hlhj.fhp.supreme.activitys

import android.content.ComponentName
import android.content.Intent
import android.os.Build
import android.os.Bundle
import android.support.annotation.RequiresApi
import android.transition.Fade
import android.transition.Slide
import android.view.View
import com.gyf.barlibrary.ImmersionBar
import hlhj.fhp.supreme.BaseAty
import hlhj.fhp.supreme.R
import hlhj.fhp.supreme.customview.DownImgDialog
import kotlinx.android.synthetic.main.aty_ewm.*
import android.support.v4.content.ContextCompat.startActivity



/**
 * Created by Administrator on 2018\6\19 0019.
 */
class EwmAty :BaseAty(), View.OnLongClickListener {
    override fun onLongClick(v: View?): Boolean {


        DownImgDialog(this,intent.getIntExtra("type",-1)).show()
        return true
    }

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        ImmersionBar.with(this)
                .fullScreen(true)
                .statusBarDarkFont(false)
                .init()
        when(intent.getIntExtra("type",-1)){
            1->{
                img.setImageResource(R.mipmap.ic_qr)
            }
            0->{
                img.setImageResource(R.mipmap.kefu_weixin)
            }
        }
        img.setOnClickListener {
            finish()
        }
        img.setOnLongClickListener(this)
    }
    override fun getContentId(): Int {
        return R.layout.aty_ewm
    }

}